package gttp.nspa.client.adm.activity;

import gttp.nspa.shared.om.Billing;
import gttp.nspa.shared.om.Billing.Status;
import gttp.nspa.shared.om.Customer;
import gttp.nspa.shared.om.IOrder;
import gttp.nspa.shared.om.Locker;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.IsWidget;

public interface IBillingList extends IsWidget {

    public interface Presenter {

        void onListBillRequest(Long from, Long to, Status billStatus, AsyncCallback<List<Billing>> cb);

        void onAddingNewBill();

        void onPayingBill(long billId);

        void onSelectingLocker(long billId, String lockerCode);

        void onSelectingCustomer(long billId, String customerAlias);

        void onViewingOrders(long billId);

    }

    void setPresenter(Presenter presenter);

    void reload(Long from, Long to, Status billStatus);

    void billAdded(Billing bill);

    void billModified(Billing bill);

    void billRemoved(Billing bill);

    void orderAdded(long billId, IOrder order);

    void orderModified(long billId, IOrder order);

    void orderCancelled(long billId, IOrder order);

    void lockerSelected(long billId, Locker locker);

    void customerSelected(long bilId, Customer customer);

}
